package com.skywork.domain.base;

import com.skywork.utils.MyEnum;

public enum ActiveFlag implements MyEnum {
	/** 无效 */
	INACTIVE(0),
	/** 有效 */
	ACTIVE(1);

	private int value;

	ActiveFlag(int value) {
		this.value = value;
	}

	@Override
	public int getValue() {
		return value;
	}

	public static ActiveFlag fromValue(int value) {
		for (ActiveFlag activeFlag : ActiveFlag.values()) {
			if (activeFlag.value == value) {
				return activeFlag;
			}
		}
		throw new IllegalArgumentException("Cannot create evalue from value: " + value + "!");
	}
}
